package com.fuxian.service.impl;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Repository;

import com.fuxian.dao.NoticeDao;
import com.fuxian.model.Notice;
import com.fuxian.service.NoticeService;
@Repository
public class NoticeServiceImpl implements NoticeService {
	@Resource
	private NoticeDao noticedao; 
	public void addNotice(Notice notice) {
		noticedao.addNotice(notice);

	}

	public void deleteNoticeById(int id) {
		noticedao.deleteNoticeById(id);

	}

	public void modifyNotice(Notice notice) {
		noticedao.modifyNotice(notice);
	}

	public List<Notice> selectAllNotice(int start,int size) {
		return noticedao.selectAllNotice(start,size);
	}

	public List<Notice> selectNoticeByAuthor(Map map) {
		return noticedao.selectNoticeByAuthor(map);
	}

	public List<Notice> selectNoticeByCreatetime(Map map) {
		return noticedao.selectNoticeByCreatetime(map);
	}

	public Notice selectNoticeById(int id) {
		return noticedao.selectNoticeById(id);
	}
	
	public int selectCount()
	{
		return noticedao.selectNoticeCount();
	}

}
